import * as Cookies from "js-cookie";

/**
 * cookie本地储存 (已弃用)
 */
export default {
    /**
     * 写入cookies
     * @param {string} key 值名称
     * @param {string} value 值
     * @param {string} exp 过期时间
     */
    set(key, value, exp = 7) {
        Cookies.set(key, value, { expires: exp })
    },

    /**
     * 获取cookie
     * @param {string} key 值名称
     * @returns {string}
     */
    get(key) {
        let value = Cookies.get(key);
        return value
    },

    /**
     * 删除cookie
     * @param {string} key 值名称
     */
    remove(key) {
        Cookies.remove(key)
    }
}